package com.tamir.template.express.parse;

import com.alibaba.fastjson.JSON;
import com.tamir.template.bean.TNode;

import java.util.List;

/**
 * @author : tanggh
 * @description :〈描述〉
 * @date : 2016/10/26
 */
public class DefaultListHandleParse extends AbstractLogicHandleParse
{
    public static void main(String[] args)
    {
        String templateText = "<#if a>b >${a}</#if> <#if a >= b >${a}</#if>" +
                "<#if a <= b >${a}</#if><#if>";
        TNode rootNode = new TNode();
        DefaultListHandleParse parse = new DefaultListHandleParse();
        List<TNode> list = parse.parse(rootNode, templateText);
        System.out.println(JSON.toJSONString(list));
//        System.out.println(parse.getLogicTypeKey("<#list users as user >"));
//        Matcher matcher = startTagPT.matcher(templateText);
//        while (matcher.find()){
//            System.out.println(matcher.start() +":" + matcher.end());
//            System.out.println(templateText.substring(matcher.start(), matcher.end()));
//        }
    }

}
